/*
*对sdate和edate做比较，如果sdate大返回true,否则返回false
*/
package com.ibsol.model  
{
	public class CompareDate
	{
		public function CompareDate()
		{
			
		}
		public function bigSmall(sdate:String, edate:String, splitchar:String):String
		{
			var date1:Array = sdate.split(splitchar);
			var date2:Array = edate.split(splitchar);
			var result:String;
			if (int(date1[0]) > int(date2[0]))
			{
				trace("year1:"+date1[0]+"/n"+"year2:"+date2[0]);
				return result = ">";
			}
			if (int(date1[0]) < int(date2[0]))
			{
				trace("year1:"+date1[0]+"/n"+"year2:"+date2[0]);
				return result = "<";
			}
			if (int(date1[0]) == int(date2[0]))
			{
				if (int(date1[1]) > int(date2[1]))
				{
					trace("month1:"+date1[1]+"/n"+"month2:"+date2[1]);
					return result = ">";
				} 
				if (int(date1[1]) < int(date2[1]))
				{
					trace("month1:"+date1[1]+"/n"+"month2:"+date2[1]);
					return result = "<";
				} 
				if (int(date1[1]) == int(date2[1]))
				{
					if (int(date1[2]) > int(date2[2]))
					{
						return result =">";
					}
					if (int(date1[2]) < int(date2[2]))
					{
						return result ="<";
					}			
					if (int(date1[2]) == int(date2[2]))
					{
						return result ="=";
					}							
				} 								
			}			
			return result;
		}

	}
}